import axios from '../config/axios'

import {loginParams} from '../config/type'

/**
 * @description: 登录接口
 */
export function loginApi(params:loginParams){
    return axios.post("/user/login",params)
}

/**
 * @description: 注册接口
 */
 export function registerApi(params:any){
    return axios.post("/user/register",params)
}

/**
 * @description:获取分类接口
 */
 export function getClass(){
    return axios.get("/user/getclasslist",{})
}

/**
 * @description:发布文章
 */
 export function writeArticle(params: any){
    return axios.post("/user/writeArticle",params)
}

/**
 * @description:获取文章列表
 */
 export function readArticle(params: any){
    return axios.get("/user/readArticle",params)
}
/**
 * @description:获取文章详情
 */
 export function getArticle(params: any){
    return axios.get("/user/getArticle",params)
}
/**
 * @description:发布评论
 */
 export function postComment(params: any){
    return axios.post("/user/postComment",params)
}

/**
 * @description:获取评论列表
 */
 export function getCommentList(params: any){
    return axios.get("/user/getCommentList",params)
}

/**
 * @description:获取评论列表
 */
 export function delComment(params: any){
    return axios.get("/user/delComment",params)
}

